package Exer03_分支;

import java.util.Scanner;

public class _1_3_9_求几位数 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num = scanner.nextInt();
        int value = 1;
        if (num >= 10000 && num <= 99999 ){
            value = 5;
        } else if (num >= 1000 && num <= 9999) {
            value = 4;
        }else if (num >= 100 && num <= 999) {
            value = 3;
        }else if (num >= 10 && num <= 99) {
            value = 2;
        }else if (num >= 0 && num <= 9) {
            value = 1;
        }
        System.out.println(value);
        scanner.close();
    }
}
